package com.k8s.consumer.runner;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @Author：小鹿爱吃鱼
 * @Date: 2025/5/12 18:34
 * @Description:
 *
 * run方法执行完毕之后,http://localhost:8081/actuator/health/readiness才为UP
 * 这样可以告诉k8s,我这个pod可以接收流量了
 */
@Component
public class ReadCacheRunnner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) throws Exception {

        //Thread.sleep(20*1000);

        System.out.println("ReadCacheRunnner end");
    }

}
